POV-Ray : Newsgroups : povray.general : Cannot layer a patterned texture over another : Re: Cannot layer a patterned texture over another Server Time
2 Aug 2024 12:20:55 EDT (-0400)
  Re: Cannot layer a patterned texture over another  
From: Rafal 'Raf256' Maj
Date: 28 Oct 2004 20:38:04
Message: <Xns95911B310EE12raf256com@203.29.75.35>
spa### [at] raf256com news:Xns9590DDE145B7Eraf256com@203.29.75.35

> Parse Error: Cannot layer a patterned texture over another.
> 

After a bit of reading manual, actually there is a sollution,

2.3.4.12  Limitations Of Special Textures

For example, say we have a layered texture called Speckled_Metal, which 
produces a silver metallic surface, and then puts tiny specks of rust all 
over it. Then we decide, for a really rusty look, we want to create patches 
of concentrated rust, randomly over the surface. The obvious approach is to 
create a special texture pattern, with transparency to use as the top 
layer. But of course, as we have seen, we would not be able to use that 
texture pattern as a layer. We would just generate an error message. The 
solution is to turn the problem inside out, and make our layered texture 
part of the texture pattern instead, like this 

  // This part declares a pigment for use
  // in the rust patch texture pattern
  #declare Rusty = pigment {
    granite
    color_map {
      [ 0 rgb <0.2, 0, 0> ]
      [ 1 Brown ]
    }
    frequency 20
  }
  // And this part applies it
  // Notice that our original layered texture
  // "Speckled_Metal" is now part of the map
  #declare Rust_Patches = texture {
    bozo
    texture_map {
      [ 0.0  pigment {Rusty} ]
      [ 0.75 Speckled_Metal ]
      [ 1.0  Speckled_Metal ]
    }
  }

And the ultimate effect is the same as if we had layered the rust patches 
on to the speckled metal anyway. 



...sorry for easy question then. And bless manual :)

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.